package org.cyb.demo.domain;

import java.util.ArrayList;
import java.util.List;

public class Section implements Comparable<Section>{
    private int sectionId;
    private int sectionNumber;
    private String sectionName;
    private List<Ppt> pptList;
    private List<Video> videoList;

    public Section() {
        super();
        pptList = new ArrayList<Ppt>();
        videoList = new ArrayList<Video>();
    }

    public int getSectionId() {
        return sectionId;
    }

    public void setSectionId(int sectionId) {
        this.sectionId = sectionId;
    }

    public int getSectionNumber() {
        return sectionNumber;
    }

    public void setSectionNumber(int sectionNumber) {
        this.sectionNumber = sectionNumber;
    }

    public String getSectionName() {
        return sectionName;
    }

    public void setSectionName(String sectionName) {
        this.sectionName = sectionName;
    }

    public List<Ppt> getPptList() {
        return pptList;
    }

    public void setPptList(List<Ppt> pptList) {
        this.pptList = pptList;
    }

    public List<Video> getVideoList() {
        return videoList;
    }

    public void setVideoList(List<Video> videoList) {
        this.videoList = videoList;
    }

    @Override
    //用于学习页面将节排序
    public int compareTo(Section section) {
        if(this.sectionNumber > section.getSectionNumber()){
            return 1;
        }else if(this.sectionNumber < section.getSectionNumber()){
            return -1;
        }
        return 0;
    }
}